<template>
    <div class="home_page_h">
      <loading v-if="isShowLoading"></loading>
      <div class="flex_center" v-if="!isShowLoading" style="height: 100%">
        <div class="white_bac bodyContent flex flex_column flex_around flex_vertical_center" style="height: 100%">
          <router-link :to="'/goods'">
            <div class="homePageCircle flex_column flex_center">
              <i class="fa fa-support" style="font-size: 2rem;margin-bottom: 1rem"></i>
              <span>零售订水</span>
            </div>
          </router-link>
          <router-link :to="{path:'/qds/simple',query:{admin_id:1}}">
            <div>aaaaa</div>
            <!--<img src="" v-lazy="info.avatarurl">-->
          </router-link>
          <router-link :to="'/qds/bookingWater'">
            <div class="homePageCircle flex_column flex_center">
              <i class="fa fa-tint" style="font-size: 2rem;margin-bottom: 1rem"></i>
              <span>水票订水</span>
            </div>
          </router-link>
        </div>
      </div>
      <footer-app :type=0></footer-app>
    </div>

</template>

<script>
  import Loading from "../../components/loading";

  const initChips = ['primary', 'secondary', 'success', 'warning', 'info', 'error'];
  import footerApp from './../public_components/foot'
  import http from '../../assets/js/http'
  export default {
    data () {
      return {
        isShowLoading:true,
        img:'../home_page/img/01.jpg',
      }
    },

    beforecreate:{

    },
      mounted(){
      this.initH();
      this.initHomePage();
    },
    methods: {
      initH(){
        var allH = document.documentElement.clientHeight;
        var footH = $('.foot').height();
        var h = allH - footH;
        $('.home_page_h').css('height',h + 'px');
      },
      initHomePage(){
        let xcx_openid = this.$route.query.xcx_openid || '';
        let wx_openid = this.$route.query.wx_openid || '';
        let sid = this.$route.query.sid || '';

        if (xcx_openid || wx_openid) {

          //如果连接带有个信息，则获取当前登录人详细信息
          this.initMemberInfo(xcx_openid,wx_openid,sid);
        }else {
          this.isShowLoading = false;
        }
      },

      initMemberInfo(xcx_openid,wx_openid,sid){
        this.yesS.bucketMember(
          {xcx_openid: xcx_openid, wx_openid: wx_openid, sid: sid}
        ).then(res => {
          var info = res.data.info;
          this.isShowLoading = false;
          if (info != '' && info != undefined) {
            this.setCache('login_key', info);
           /* this.checkShopStatus();*/
          }
        })
      },
    },
    components:{
      Loading,
      footerApp,
    }
  };
</script>

<style scoped>
  /*@import 'https://cdn.bootcss.com/material-design-icons/3.0.1/iconfont/material-icons.css';*/
  .demo-chip-wrapper {
    text-align: center;
  }
  .demo-chip {
    margin: 8px;
    vertical-align: middle;
  }
  .demo-loadmore-wrap {
    width: 100%;
    max-width: 360px;
    height: 420px;
    display: flex;
    flex-direction: column;
  }

  .mu-appbar {
    width: 100%;
  }
  .demo-loadmore-content {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .homePageCircle{
    width: 9rem;
    height: 9rem;
    background: #3bade8;
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
  }



</style>
